package com.ctshk.app.scenic.controller;

import com.ctshk.common.dto.Result;
import com.ctshk.common.model.PageResponse;
import com.ctshk.common.web.support.BaseController;
import com.ctshk.rpc.scenic.dto.app.inner.ScenicTicketListDTO;
import com.ctshk.rpc.scenic.req.TicketRecommendReq;
import com.ctshk.rpc.scenic.service.app.IScenicTicketRecommendService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *     景点推荐门票服务
 * </p>
 * @author 黄先
 */
@Api(value = "景点推荐门票服务", tags = "景点推荐门票服务")
@RestController
@RequestMapping("/es/ticketRecommend")
public class TicketRecommendController extends BaseController {
    @DubboReference
    IScenicTicketRecommendService iScenicTicketRecommendService;

    @PostMapping("/selectTicketRecommend")
    @ApiOperation(value = "查询景点推荐票", notes = "查询景点推荐票")
    public Result<PageResponse<ScenicTicketListDTO>> selectTicketRecommend(@RequestBody TicketRecommendReq req, @RequestParam(required = false, defaultValue = "1") Integer pageNum, @RequestParam(required = false, defaultValue = "10") Integer pageSize) {
        return iScenicTicketRecommendService.selectTicketRecommendList(req, pageNum, pageSize);
    }
}
